home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14463 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.mcs.net!usenet
  2. From: mikey@mcs.com (Mike Young)
  3. Newsgroups: comp.lang.ada,comp.lang.c++
  4. Subject: Re: some questions re. Ada/GNAT from a C++/GCC user
  5. Date: 31 Mar 1996 00:50:46 GMT
  6. Organization: Fen Software, Inc.
  7. Message-ID: <4jkkt6$fdb@Nntp1.mcs.net>
  8. References: <wnewmanDoxrCp.DKv@netcom.com> <4je9ju$174r@watnews1.watson.ibm.com> <ROGOFF.96Mar28134118@sccm.Stanford.EDU> <4jhe1v$m0g@dayuc.dayton.saic.com> <315CDCF9.31AF@mcs.com> <315D902C.6F7B@escmail.orl.mmc.com>
  9. NNTP-Posting-Host: mikey.pr.mcs.net
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-Newsreader: WinVN 0.99.6
  13.  
  14. In article <315D902C.6F7B@escmail.orl.mmc.com>, dennison@escmail.orl.mmc.com 
  15. says...
  16. >
  17. >Mike Young wrote:
  18. >> 
  19. >> Hmmmm. Lacking a language based synch method doesn't mean we always go
  20. >> straight to the semaphore library. I commonly use thin wrappers to guard
  21. >> precious resources -- for example: mutexes, semaphores, files,
  22. >> or database sessions. Local scoping allows precise control of lifetimes,
  23. >> and ensure release even when exceptions are possible:
  24. >
  25. >OK. Now what do you do if you have to port that code to DOS? :-)
  26.  
  27. ===========
  28. I believe it would then be time to consider relocation. The code itself, 
  29. however, requires only minor modifications: return successful immediately. The 
  30. concept -- resource guarding in a local scope -- still applies. :)
  31.  
  32. Mike.
  33.  
  34.